<!doctype html>
<html manifest="/svn/trunk/offline.appcache">
  <head>
    <meta charset="utf-8">
    <link rel="stylesheet" href="styles.css">
    <link rel="stylesheet" href="progress-polyfill.css">

    <title>Offline Wiki</title>
    <!--      
      If you're reading this in the distant future, say, 2012, and you aren't preparing
      for the imminent apocalyptic scenarios (or if you are, that would be cool too), you 
      should totally email me at antimatter15@gmail.com.
      
      If you're reading this in the post-apocalyptic world, or if for some odd reason
      skynet was actually powered by Amazon EC2 during the great outage of April 21st,
      2011, and somehow the malfunctioning of the cloud resulted in the prolonging of 
      human existence, then you should still email me because there might be a decent
      chance that I would have survived the chaos which ensued during the eventless
      apocalypse.
      
      And in case the future me ever reads this. Hi. I'm you from the past. It would be
      pretty interesting to meet you. But regardless, I would probably be disappointed
      in whatever you've done because life seems to continue according to my diminishing
      intelligence hypothesis. Probably, you're at least thinking that you're a lot dumber
      than you were when I wrote this, and wondering why I consider myself a different person
      when existing in different times. However, the people who aren't me who might happen
      to read this document will probably find it really weird that some guy talks to himself
      about the future and past and is probably insane or suffering some odd self diagnosed
      inferiority complex instigated by the two time rejection from an unnamed institution
      for people interested in science and technology. But saying that would make future me
      feel weird as well as future non-mes.
    -->
    <script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-1367972-7']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>
  </head>
  <body>
  
  
    <header id="toolbar">
    
      <h1 id="title">Offline Wiki</h1>

        <div style="display: none" id="download">
          <div id="status"><b>Initializing</b></div>
          <progress id="progress" value=""></progress>
        </div>
        <input type="text" placeholder="Search" autocomplete=off spellcheck=false  id="search">

        <div id="nav">

          <a href="?Special:Settings">Settings</a>
          <a href="?Special:Index">Index</a>
          <a href="?Special:Random">Random</a>
        </div>
        
        <div id="outline">
        </div>
    </header>
    
    <div id="container">
      <div id="settings" style="display:none">
        <!--
        <p>
          This is the settings page. One day, in the distant future, this will be idealistic and overflowing with neat tools and great notions.


        </p>-->

    <p>
  <b>Select the file</b> you want to use. There isn't much to choose from, I know. I'm sorry.
  </p>
   <p>
    <select id="dump" onchange="switch_dump(this.value)">
      <option value="leet">1337 December 2011 (13.7MB)</option>
      <option value="pi">314k December 2011 (1GB) </option>
    </select>
   </p>
    <p>
    Select the <b>parsing engine</b>. This takes the wikitext and turns it into html which is then meant for human eyes.
    </p>
<p>
    <select id="parser">
      <option value="instawiki">InstaView Parser</option>
      <option value="source">Source View</option>
      <option value="splus">Enhanced Source View</option>
      <option value="basic">Basic Parser</option>
    </select>
   </p>
    <p>
      This will <b>pause the current downloads</b> for the remainder of this session.
    </p>   
   <p>

   <button onclick="stop_download=true;this.disabled=true">Stop downloads</button>
   </p>     
   <p>
    This will <b>delete the current dump</b> from your computer. The file can be downloaded again.
   </p>
   <p>
   <button onclick="nero()">Delete dump</button>
   </p>
      </div>
      <article id="content">

        <h2>Introduction</h2>
      
  <img id="xkcd" src="image/xkcd.png" usemap="#xkcd" border="0" style="float:right;margin-left:15px;margin-bottom:15px;" width="500" height="503" alt="" title="The obligatory xkcd strip." />
<map id="xkcd" name="xkcd">
<area shape="rect" coords="156,241,358,295" href="http://xkcd.com/214/" alt="" title=""    />

<area shape="rect" coords="148,75,345,103" href="?Tacoma_Narrows_Bridge" alt="" title=""    />
<area shape="rect" coords="138,113,225,151" href="?Suspension_bridge" alt="" title=""    />
<area shape="rect" coords="277,115,364,153" href="?Structural_failure" alt="" title=""    />
<area shape="rect" coords="21,420,116,462" href="?William_Howard_Taft" alt="" title=""    />
<area shape="rect" coords="97,377,183,419" href="?24-hour_clock" alt="" title=""    />
<area shape="rect" coords="152,431,238,473" href="?Lesbianism_in_erotica" alt="" title=""    />
<area shape="rect" coords="252,394,316,415" href="?Batman" alt="" title=""    />
<area shape="rect" coords="252,429,316,470" href="?Death_from_laughter" alt="" title=""    />
<area shape="rect" coords="322,414,386,455" href="?Taylor_Hanson" alt="" title=""    />
<area shape="rect" coords="400,369,452,394" href="?Cotton" alt="" title=""    />
<area shape="rect" coords="404,406,464,431" href="?T-shirt" alt="" title=""    />
<area shape="rect" coords="392,441,487,487" href="?Wet_T-shirt_contest" alt="" title=""    />
</map>


        This application saves and <b>downloads a copy</b> of nearly all of the textual content of the <b>English Wikipedia</b> locally so that it can be <b>accessed without internet connectivity</b>. It downloads and saves a compressed dump file and an index, 14MB for the small version and 1GB for the larger one (you can select which one from the <a href="?Special:Settings">settings</a>). Using WebWorkers and the File API, it seeks to a specific part of the compressed dump, decompresses it with a pure javascript implementation of LZMA and renders the Wikitext as HTML. All of this happens almost <b>instantly</b>.
        <h2>Install</h2>
        <p>
          You don't really need to, just <b>bookmark this page</b> and you can use it any time with or without internet access. If you want the convenience of getting to this from your new tab page, install the <a href="https://chrome.google.com/webstore/detail/oehajijgnimplajibelflobkdfggmnka">chrome app</a>.
        </p>
        <p>
        <a href="https://chrome.google.com/webstore/detail/oehajijgnimplajibelflobkdfggmnka">
        <img src="http://code.google.com/chrome/webstore/images/branding/ChromeWebStore_Badge_v2_206x58.png">
        </a>
        <script type="text/javascript">reddit_url='http://offline-wiki.googlecode.com/git/app.html'</script>

<script type="text/javascript" src="http://www.reddit.com/static/button/button1.js"></script>

<!-- Place this tag where you want the +1 button to render -->
<g:plusone href="http://offline-wiki.googlecode.com/git/app.html"></g:plusone>

<!-- Place this render call where appropriate -->
<script type="text/javascript">
  (function() {
    var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
    po.src = 'https://apis.google.com/js/plusone.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
  })();
</script>
<iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Foffline-wiki.googlecode.com%2Fgit%2Fapp.html&amp;send=false&amp;layout=button_count&amp;width=100&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font&amp;height=21&amp;appId=193977040675297" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100px; height:21px;" allowTransparency="true"></iframe>

<a href="https://twitter.com/share?url=http%3A%2F%2Foffline-wiki.googlecode.com%2Fgit%2Fapp.html" class="twitter-share-button" data-lang="en">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
        </p>  
        <h2>Credits</h2>
        <p>
          This was put together by <a href='http://twitter.com/antimatter15'>@antimatter15</a> (Follow me on <a href="https://plus.google.com/116347431032639424492/about">Google+</a>!) but is built on <a href="http://en.wikipedia.org/wiki/User:Pilaf/InstaView">Instaview</a> by Pilaf, <a href="http://frankyan.com/labs/html5slider/">html5slider</a> by Frank Yan, <a href="https://github.com/LeaVerou/HTML5-Progress-polyfill">HTML5 Progress Polyfill</a> by Lea Verou, <a href="https://github.com/glinscott/lzmajs">lzmajs</a> by Gary Linscott, and of course all the content by the Wikipedia community.
        </p>
        <h2>Checking Compatibility</h2>
        <p>
          This has been tested on iOS 5, Chrome 17 and Firefox 10. It works best on Chrome.
        </p>
        <ul>
        <script>
          function test(name, val){
            document.write('<li>'+(val?'<span style="color:green">':'<span style="color:red">')+name+'</span></li>');
          }
          test('FileReader support', !!window.FileReader);
          test('WebSQL support (optional)', !!window.openDatabase)
          test('IndexedDB support (optional)', window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB);
          test('FileSystem API (optional)', window.requestFileSystem || window.webkitRequestFileSystem);
          test('BlobBuilder', window.WebKitBlobBuilder || window.BlobBuilder || window.MozBlobBuilder);
          test('Typed Arrays', window.Uint8Array);
          test('Array Buffer', window.ArrayBuffer);
          test('XHR responseType', 'responseType' in (new XMLHttpRequest))
          test('Offline Application Cache', window.applicationCache);
          test('WebWorkers', window.Worker);
          test('History replaceState', history.replaceState);
          test('Local Storage', window.localStorage);
          test('querySelectorAll', document.querySelectorAll);
        </script>
        </ul>

            
<div style="clear: both;"></div>
      </article>
    </div>
    
    <div id="autocomplete" class="autocomplete" style="display:none; position: fixed; right: 20px; top: 28px"></div>
    
    <footer>
      Offline Wiki was made by <a href="http://twitter.com/antimatter15">@antimatter15</a>. His other projects can be found on <a href="http://antimatter15.com/">antimatter15.com</a>. The source code and instructions for compiling other languages for this project can be found on <a href="https://code.google.com/p/offline-wiki">google code</a>.
    </footer>

    <script src="js/autocomplete.js"></script>
    <script src="js/search.js"></script>
    <script src="js/html5slider.js"></script>
    <script src="js/progress-polyfill.js"></script>
    <script src="js/lzma.js"></script>
    <script src="js/render.js"></script>
    <script src="js/ui.js"></script>
    <script src="js/fs2.js"></script>
  </body>
</html>
